<?php

use think\facade\Route;
use app\api\middleware\LoginMiddleware;
use app\api\middleware\UserVisitLog;

Route::group('user', function () {
    //获取用户信息
    Route::get('getUserInfo', 'user.User/getUserInfo');
    //修改手机号
    Route::post('updateMobile', 'user.User/updateMobile');
    //修改密码
    Route::post('updatePassword', 'user.User/updatePassword');
    //修改头像
    Route::post('updateAvatar', 'user.User/updateAvatar');
    //修改昵称
    Route::post('updateNickname', 'user.User/updateNickname');
    //修改邮箱
    Route::post('updateEmail', 'user.User/updateEmail');
    //修改性别
    Route::post('updateSex', 'user.User/updateSex');
})->middleware([
    LoginMiddleware::class,
    UserVisitLog::class
]);

Route::group('user', function () {
    //获取用户中心样式
    Route::get('getCenterStyle', 'user.User/getCenterStyle');
})->middleware([
    UserVisitLog::class
]);